package oopday02;
//创建Chick类，继承Animal类
/*public class Chick extends Animal {
    //1。1创建Chick
    Chick(){
    }

    //1.2
    Chick(String name, int age,String color){
        super(name, age, color);
    }

    //2
    void layeggs(){
        System.out.println(color+"色的"+age+"岁的小鸡"+name+"正在下蛋");
    }

    //3.重写
    void eat(){
        System.out.println(color+"色的"+age+"岁的"+name+"正在吃小米");
    }
}*/
public class Chick extends Animal {
    Chick(String name, int age, String color) {
        super(name, age, color);
    }
    void eat() {
        System.out.println(color+"色的"+age+"岁的小鸡"+name+"正在吃小米");
    }
    void layeggs(){
        System.out.println(color+"色的"+age+"岁的小鸡"+name+"正在下蛋");
    }
}
